package org.amse.mARICa;

import java.io.PrintStream;

public class Logger {
	
	private boolean isLog;
	private boolean isLogTreeOfAI;
	private PrintStream myOut = System.out;
	private boolean isStepGame;
	private static Logger myLoger = null;
	
	public static Logger getInctanse(){
		if (myLoger == null){
			myLoger = new Logger();
		}
		return myLoger;
	}

	public boolean isLog() {
		return isLog;
	}
	
	public void setLog(boolean isLog) {
		this.isLog = isLog;
	}
	
	public boolean isLogTreeOfAI() {
		return isLogTreeOfAI;
	}
	
	public void setStepGame(boolean isStepGame) {
		this.isStepGame = isStepGame;
	}
	
	public boolean isStepGame() {
		return isStepGame;
	}

	public void setLogTreeOfAI(boolean isLog) {
		this.isLogTreeOfAI = isLog;
	}

	public PrintStream getOut() {
		return myOut;
	}

	public void setOut(PrintStream myOut) {
		this.myOut = myOut;
	}
	
	public void println(String str){
		if (isLog){
			myOut.println(str);
		}
	}
	
	public void print(String str){
		if (isLog){
			myOut.print(str);
		}
	}
	
	public void AIprintln(String str){
		if (isLogTreeOfAI){
			myOut.println(str);
		}
	}
	
	public void AIprint(String str){
		if (isLogTreeOfAI){
			myOut.print(str);
		}
	}
	
	public void StepPrintln(String str){
		if (isStepGame){
			myOut.println(str);
		}
	}
	
	public void StepPrint(String str){
		if (isStepGame){
			myOut.print(str);
		}
	}
}
